<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$id = $_GET['id'];
$id = intval($id);

require_once 'db_emp_conn.php';
$sql = "select* from dbconn where id=$id limit 1";

$result = $conn->query($sql);
$data = array();
if($result ->num_rows > 0){
    $rows =$result->fetch_all(MYSQLI_ASSOC);
    $data['status'] = 1;
    $data['info']=$rows[0];
}else{
    $data['status'] = 0;
    $data['info'] = "no information";
}
echo json_encode($data); //将数组转换成json格式数据
